<?php
class Dig_Service_Site
{
    public static function getAdminForms() {
        $forms = array();
        foreach( Dig_Service_Module::listAll() as $module => $settings ) {
            if( isset($settings['site']['adminForms'] )) {
                foreach ($settings['site']['adminForms'] as $title => $form) {
                    if(isset( $forms[$title] )) {
                        throw new DigCms_Exception('The admin form ' . $title .
                                ' has already been registered');
                    }
                    $forms[$title] = $form;
                }
            }
        }
        if(count($forms) > 0) {
            ksort($forms);
            return $forms;
        }
        return false;
    }

}
?>
